package com.ruoyi.mining.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mining.mapper.CourseConsumptionMapper;
import com.ruoyi.mining.domain.CourseConsumption;
import com.ruoyi.mining.service.ICourseConsumptionService;

/**
 * 课消信息Service业务层处理
 *
 * @author liyuxi
 * @date 2024-04-10
 */
@Service
public class CourseConsumptionServiceImpl implements ICourseConsumptionService {
    @Autowired
    private CourseConsumptionMapper courseConsumptionMapper;

    /**
     * 查询课消信息
     *
     * @param id 课消信息主键
     * @return 课消信息
     */
    @Override
    public CourseConsumption selectCourseConsumptionById(Long id) {
        return courseConsumptionMapper.selectCourseConsumptionById(id);
    }

    /**
     * 查询课消信息列表
     *
     * @param courseConsumption 课消信息
     * @return 课消信息
     */
    @Override
    public List<CourseConsumption> selectCourseConsumptionList(CourseConsumption courseConsumption) {
        return courseConsumptionMapper.selectCourseConsumptionList(courseConsumption);
    }

    /**
     * 新增课消信息
     *
     * @param courseConsumption 课消信息
     * @return 结果
     */
    @Override
    public int insertCourseConsumption(CourseConsumption courseConsumption) {
        return courseConsumptionMapper.insertCourseConsumption(courseConsumption);
    }

    /**
     * 修改课消信息
     *
     * @param courseConsumption 课消信息
     * @return 结果
     */
    @Override
    public int updateCourseConsumption(CourseConsumption courseConsumption) {
        return courseConsumptionMapper.updateCourseConsumption(courseConsumption);
    }

    /**
     * 批量删除课消信息
     *
     * @param ids 需要删除的课消信息主键
     * @return 结果
     */
    @Override
    public int deleteCourseConsumptionByIds(Long[] ids) {
        return courseConsumptionMapper.deleteCourseConsumptionByIds(ids);
    }

    /**
     * 删除课消信息信息
     *
     * @param id 课消信息主键
     * @return 结果
     */
    @Override
    public int deleteCourseConsumptionById(Long id) {
        return courseConsumptionMapper.deleteCourseConsumptionById(id);
    }
}
